<template>
  <h1>EL-布局组件</h1>
<!--  el-row每一行固定了24份 ：span来控制当前el-col列占24份中的具体份数-->
  <<el-row >
    <el-col :span="6" style="background-color:red">10</el-col>
    <el-col :span="6" style="background-color:blue">10</el-col>
    <el-col :span="6" style="background-color: #0aa1ed">10</el-col>
    <el-col :span="6" style="background-color: green">10</el-col>
  </el-row>
<!--  天沟：每列左右的间距margin-->
  <el-row :gutter="100" >
    <el-col :span="6" style="background-color:red;border: 5px solid">10</el-col>
    <el-col :span="6" style="background-color:blue">10</el-col>
    <el-col :span="6" style="background-color: #0aa1ed">10</el-col>
    <el-col :span="6" style="background-color: green">10</el-col>
  </el-row>
  <el-row :gutter="10" >
    <el-image  src="/laicai.jpg" style="width: 200px;height: 100%" alt=""></el-image>
    <el-image  src="/laicai.jpg" style="width: 200px;height: 100%" alt=""></el-image>
    <el-image  src="/laicai.jpg" style="width: 200px;height: 100%" alt=""></el-image>
    <el-image  src="/laicai.jpg" style="width: 200px;height: 100%" alt=""></el-image>
  </el-row>
  <h3>三张图 图片宽度比例1:2:3</h3>
  <el-row>
    <el-col :span="4"><img src="/laicai.jpg" style="width:100%;"></el-col>
    <el-col :span="8"><img src="/laicai.jpg" style="width:100%;"></el-col>
    <el-col :span="12"><img src="/laicai.jpg" style="width:100%;"></el-col>
  </el-row>
  <h3>显示数字：v-for="item in 8"</h3>
  <el-row>
    <el-col :span="3"  v-for="item in 8">{{item}}</el-col>
  </el-row>
  <h3>列偏移 ：offset="0" 默认靠左不偏移，写几就向右移动几列</h3>
  <el-row>
      <el-col :span="20" :offset="4" >
      <img  src="/laicai.jpg" style="width: 100%;">
      </el-col>
  </el-row>
  <h3>列嵌套</h3>
  <el-row>
    <el-col :span="12" style="border: 5px solid #0f0;">111</el-col>
    <el-col :span="12" style="border: 5px solid #f0f;">
      <!-- 嵌套时,一定要把当前元素再重新看作是一个新的el-row,还是24份,再进行分配!  -->
      <el-row>
        <el-col :span="8" style="border: 5px solid #f00;">222</el-col>
        <el-col :span="8" style="border: 5px solid #0ff;">222</el-col>
        <el-col :span="8" style="border: 5px solid #00f;">222</el-col>
      </el-row>
    </el-col>
  </el-row>

</template>
<script setup>
import {ref} from "vue";

const vehicleArr = ref([
  {brand:'奥迪',model:'A8',license:'京A88888',color:'红',km:1000000},
  {brand:'奥迪',model:'A8',license:'京A88888',color:'红',km:1000000},
  {brand:'奥迪',model:'A8',license:'京A88888',color:'红',km:1000000},
  {brand:'奥迪',model:'A8',license:'京A88888',color:'红',km:1000000},
  {brand:'奥迪',model:'A8',license:'京A88888',color:'红',km:1000000},
  {brand:'奥迪',model:'A8',license:'京A88888',color:'红',km:1000000},
  {brand:'奥迪',model:'A8',license:'京A88888',color:'红',km:1000000}
]);
</script>


<style scoped>

</style>